import { createRouter, createWebHistory } from 'vue-router'
import firstView from '../views/firstView.vue'
import home from '../views/home.vue'
import adminView from '../views/adminView.vue'

const routes = [
  {
    path: '/',
    redirect: '/firstView'
  },
  {
    path: '/firstView',
    component: firstView,
    children: [
      {
        path: 'home',
        component: home
      }
    ]
  },
  {
    path: '/admin',
    name: 'BadmintonGymAdmin',
    component: adminView
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
